package day03;

/**
 * @author yzh
 * @desc TODO
 * @date 2025/4/9
 */
public class Level02_02 {
    public static void main(String[] args) {
        int x=2,y=3;
        switch(x){
            default:
                y++;
            case 3:
                y++;
                break;
            case 4:
                y++;
        }
        System.out.println("y="+y); // y=5
        /* x=2无匹配的case执行default,y值变为4,
         但无break语句继续往下执行case3,y值变为5,
         遇到break退出switch*/
    }
}
